[IA64] work around ENOSYS vs EINVAL in ioremap
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Tue, 23 May 2006 23:05:27 +0000 (17:05 -0600)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Tue, 23 May 2006 23:05:27 +0000 (17:05 -0600)
We should not panic the domain for an EINVAL return from the ioremap
hyerpcall.  This was only meant for ENOSYS.  Long term this is probably
not the best place for this kind of sanity checking.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
linux-2.6-xen-sparse/include/asm-ia64/hypercall.h

index 81c8c7ee4efc2a766a244003a04ac2abdca10d8b..45f65ebc2aae004b1bc97706541984af55944d64 100644 (file)
@@ -431,10 +431,12 @@ HYPERVISOR_ioremap(unsigned long ioaddr, unsigned long size)
        unsigned long ret = ioaddr;
        if (running_on_xen) {
                ret = __HYPERVISOR_ioremap(ioaddr, size);
-               if (unlikely(IS_ERR_VALUE(ret)))
+               if (unlikely(ret == -ENOSYS))
                        panic("hypercall %s failed with %ld. "
                              "Please check Xen and Linux config mismatch\n",
                              __func__, -ret);
+               else if (unlikely(IS_ERR_VALUE(ret)))
+                       ret = ioaddr;
        }
        return ret;
 }